package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyOwnerMapper;
import com.ruoyi.system.domain.PropertyOwner;
import com.ruoyi.system.service.IPropertyOwnerService;

/**
 * 业主信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyOwnerServiceImpl implements IPropertyOwnerService 
{
    @Autowired
    private PropertyOwnerMapper propertyOwnerMapper;

    /**
     * 查询业主信息
     * 
     * @param ownerId 业主信息主键
     * @return 业主信息
     */
    @Override
    public PropertyOwner selectPropertyOwnerByOwnerId(Long ownerId)
    {
        return propertyOwnerMapper.selectPropertyOwnerByOwnerId(ownerId);
    }

    /**
     * 查询业主信息列表
     * 
     * @param propertyOwner 业主信息
     * @return 业主信息
     */
    @Override
    public List<PropertyOwner> selectPropertyOwnerList(PropertyOwner propertyOwner)
    {
        return propertyOwnerMapper.selectPropertyOwnerList(propertyOwner);
    }

    /**
     * 新增业主信息
     * 
     * @param propertyOwner 业主信息
     * @return 结果
     */
    @Override
    public int insertPropertyOwner(PropertyOwner propertyOwner)
    {
        return propertyOwnerMapper.insertPropertyOwner(propertyOwner);
    }

    /**
     * 修改业主信息
     * 
     * @param propertyOwner 业主信息
     * @return 结果
     */
    @Override
    public int updatePropertyOwner(PropertyOwner propertyOwner)
    {
        return propertyOwnerMapper.updatePropertyOwner(propertyOwner);
    }

    /**
     * 批量删除业主信息
     * 
     * @param ownerIds 需要删除的业主信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyOwnerByOwnerIds(Long[] ownerIds)
    {
        return propertyOwnerMapper.deletePropertyOwnerByOwnerIds(ownerIds);
    }

    /**
     * 删除业主信息信息
     * 
     * @param ownerId 业主信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyOwnerByOwnerId(Long ownerId)
    {
        return propertyOwnerMapper.deletePropertyOwnerByOwnerId(ownerId);
    }
}
